<?php
    //echo $this->Html->css(array('fullcalendar.css', 'jquery-ui-1.8.9.custom.css', 'screen.css', 'ie.css'),'stylesheet', array('media'=>'screen'));
	//echo $this->Html->script(array('jquery-1.4.4.min.js', 'jquery-ui-1.8.9.custom.min.js', 'fullcalendar.min.js', 'gcal.js'));
      
?>


<script type="text/javascript">

</script>


<?php
	//echo pr($felist);
?>

<div class="main-content grid_7 alpha">
                        <header>
                            <ul class="action-buttons clearfix fr">
                                <li><a href="../jobs/jview" class="button button-gray no-text" title="View the Task Calendar">Task Calendar<span class="calendar"></span></a></li>
                                <li><a href="documentation/index.html" class="button button-gray no-text help" rel="#overlay">Help<span class="help"></span></a></li>
                            </ul>
                            <div class="view-switcher">
                                <h2>My Upcoming Tasks <a href="#">&darr;</a></h2>
                                
                                <?php echo $this->element('taskmenu');?>
                                
                            </div>
                        </header>

                        <section>
                            <ul class="listing list-view">
                                <?php
                                //echo print_r($_SESSION);
                                //echo pr($felist);
                                $today = date("Y-m-d");
                                
                                //print_r($today);
                                foreach($felist as $task)
                                {

                               $tday = date("Y-m-d", strtotime($task['Job']['sdate']));
                                echo
                                '<li class="tick" id="' . $task['Job']['id'] . '">
                                    <a class="more" href="../jobs/jdetail/' . $task['Job']['id'] . '">&raquo;</a>
                                    <span class="timestamp">' . $task['Job']['sdate'] . '</span>';
                                    if($tday == $today)
                                    {
                                        echo ' <a href="../jobs/jdetail/' . $task['Job']['id'] . '">Today!</a>';
                                    }
                                    else if($task['Job']['sdate'] > $today) 
                                    {
                                        echo ' <a href="../jobs/jdetail/' . $task['Job']['id'] . '">Coming Up</a>';
                                    }
                                    echo '<p>' . $task['Job']['title'] . '</p>
                                </li>';
                                    }
                                
                                ?>
                                
                            </ul>
                            
                        </section>
                    
                </div>

        



            